package com.cmq.web_1.api_test;

import java.util.Date;

public class Student {
    private String id;          // 学号
    private String name;        // 姓名
    private int age;           // 年龄
    private String gender;     // 性别
    private String className;  // 班级
    private String major;      // 专业
    private String email;      // 邮箱
    private Date createTime;   // 创建时间

    // 构造方法
    public Student() {
        this.createTime = new Date();
    }

    public Student(String id, String name, int age, String gender,
                   String className, String major, String email) {
        this();
        this.id = id;
        this.name = name;
        this.age = age;
        this.gender = gender;
        this.className = className;
        this.major = major;
        this.email = email;
    }

    // Getter 和 Setter 方法
    public String getId() { return id; }
    public void setId(String id) { this.id = id; }

    public String getName() { return name; }
    public void setName(String name) { this.name = name; }

    public int getAge() { return age; }
    public void setAge(int age) { this.age = age; }

    public String getGender() { return gender; }
    public void setGender(String gender) { this.gender = gender; }

    public String getClassName() { return className; }
    public void setClassName(String className) { this.className = className; }

    public String getMajor() { return major; }
    public void setMajor(String major) { this.major = major; }

    public String getEmail() { return email; }
    public void setEmail(String email) { this.email = email; }

    public Date getCreateTime() { return createTime; }
    public void setCreateTime(Date createTime) { this.createTime = createTime; }

    @Override
    public String toString() {
        return "Student{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", gender='" + gender + '\'' +
                ", className='" + className + '\'' +
                ", major='" + major + '\'' +
                ", email='" + email + '\'' +
                ", createTime=" + createTime +
                '}';
    }
}
